<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box{
      width:200px;
      height:200px;
      background: red;
    }
    .box2{
      width:200px;
      height:200px;
      background: rgb(38, 55, 151);
    }
  </style>
</head>
<body>
  <div id="app">
    <!-- <button v-on:click="fn">按钮</button> -->
    <button @click="fn">数据</button>
    <button @click="fn($event,1)">按钮2</button>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el:"#app",
      data:{
      
      },
      methods:{
        fn(e,num){
          // e.target
          console.log(e.target)
          console.log(this)
          // console.log(e)
          // alert(1)
        }
      }
     
    })

    
  </script>
</body>
</html>